$(function(){
	//alert("dsafasdf");
	var count = 1;
	//var[] nameArray = {"龙井","观音"}
	
	$("#added").click(function() {
		if(count < 5) {
			//$("#objTable").append('<tr id=tr'+count+'><td>第'+count+'工序:&nbsp;&nbsp;<input  style="width: 60%" type="text" name=process'+count+' /></td></tr>');
			$("#objTable").append('<tr id=tr'+count+' align="center" style="width: 33%; height: 25px;">'+
			'<td bgcolor="#FFFFFF"><select style="width: 100%; height: 100%;" name="names">'+
					'<option selected="selected"></option>'+
					'<option>龙井</option>'+
					'<option>观音</option>'+
				'</select></td>'+
			'<td bgcolor="#FFFFFF"><select style="width: 100%; height: 100%;" name="types"><option selected="selected"></option>'+
					'<option>盒装</option><option>袋装</option></select></td>'+
			'<td bgcolor="#FFFFFF"><input type="text" name="nums" style="width: 100%; height: 100%;"/></td></tr>');
			count++;
			$("#deled").css({display: "block"});
		}
		if(count == 5) {
			$("#added").css({display: "none"});
		}
	});
	$("#deled").click(function() {
		var i = count - 1;
		//alert("del" + i);
		$("#tr"+i).remove();
		$("#added").css({display: "block"});
		count--;
		if(count == 1) {
			$("#deled").css({display: "none"});
		}
	});
});